﻿namespace ch06.binary.interpreter
{
    public static partial class Instr
    {
        private static void Drop(ref Vm vm, object args)
        {
            vm.OperandStack.PopU64();
        }

        private static void Select(ref Vm vm, object args)
        {
            var v3 = vm.OperandStack.popBool();
            var v2 = vm.OperandStack.PopU64();
            var v1 = vm.OperandStack.PopU64();

            vm.OperandStack.PushU64(v3 ? v1 : v2);
        }
    }
}